package com.rn.ddd.domain.order.handler;

import com.rn.ddd.infrastructure.engine.PluginHandler;
import com.rn.ddd.infrastructure.engine.Result;
import com.rn.ddd.infrastructure.engine.StateContext;
import com.rn.ddd.infrastructure.engine.annotation.ProcessorPlugin;
import com.rn.ddd.infrastructure.engine.constant.OrderEventEnum;
import com.rn.ddd.infrastructure.engine.constant.OrderStateEnum;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@ProcessorPlugin(states = {OrderStateEnum.INIT}, event = OrderEventEnum.CREATE, bizTypes = {"SHOP"}, sceneIds = "MOBILE")
public class EstimatePricePlugin implements PluginHandler<String, OrderBizContext> {

    @Override
    public Result<String> execute(StateContext<OrderBizContext> context) throws Exception {
        log.info("plugin ................................");
        return new Result<>(true);
    }

}
